package com.example.ass7.sprite;

import java.awt.Color;

import com.example.ass7.geometryprimitives.Counter;
import com.example.ass7.level.GameLevel;

import biuoop.DrawSurface;

/**
 * @author Meirav Ben Izhak
 */
public class ScoreIndicator implements Sprite {

    private final Counter currentScore;

    /**
     * @param currentScore
     *            currentScore
     */
    public ScoreIndicator(
        Counter currentScore) {
        this.currentScore = currentScore;
    }

    @Override
    public void drawOn(DrawSurface d) {
        d.setColor(Color.BLACK);
        d.drawText(300, 20, "Score: "
                + this.currentScore.getValue(), 15);
    }

    @Override
    public void timePassed(double dt) {
        // empty
    }

    /**
     * @param addTo
     *            addTo
     */
    public void addToGame(GameLevel addTo) {
        addTo.addSprite(this);
    }

}
